package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.Question;
import com.ruoyi.system.mapper.QuestionMapper;
import com.ruoyi.system.service.IQuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
@Service
public class QuestionServiceImpl implements IQuestionService {
    @Autowired
    QuestionMapper questionMapper;

    @Override
    public List<Question> selectQuestionList(Question question) {
        return questionMapper.selectQuestionList(question);
    }

    @Override
    public void addQuestion(Question question) {
        questionMapper.insertQuestion(question);
    }

    @Override
    public Question selectQuestionByQuestionId(Long questionId) {
        return questionMapper.selectQuestionByQuestionId(questionId);
    }

    @Override
    public int updateQuestion(Question question) {
        return questionMapper.updateQuestion(question);
    }

    @Override
    public int deleteQuestionById(Integer questionId) {
        return questionMapper.deleteQuestionById(questionId);
    }

    @Override
    public List<Question> selectQuestionListByBankId(Long bankId) {
        return questionMapper.selectQuestionListByBankId(bankId);
    }
}
